package com.tan00xu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tan00xu.pojo.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface TagMapper extends BaseMapper<Tag> {

    /**
     * 根据文章id查询文章标签
     * @param articleId
     * @return
     */
    List<Tag> getTageByArticleId(Long articleId);

    /**
     * 查询最热标签前limit条
     * @param limit
     * @return
     */
    List<Long> listHotTagIds(int limit);

    /**
     * 根据标签id查询标签
     * @param tagIds
     * @return
     */
    List<Tag> listHotTagsByTagIds(List<Long> tagIds);
}

